/*---------------------------------------------------------------------
 * File name: hal_gpio.h
 *
 * Copyright (c) <2020-2022>, <ChenLong>
 *
 * All rights reserved.
 *
 * Author: ChenLong
 * Email: worldlong@foxmail.com
 *--------------------------------------------------------------------*/
#pragma once
/*
*/
#include "gpio.h"
/*
*/
class HAL_GPIO : public hal::GPIO {
public:
  HAL_GPIO() :
    GPIO(),
    _pin_number(0)
  {}
    
  bool     init(uint64_t cfg0);   
  bool     config(uint64_t cfg0); //Just config the param with CFG_MASK
  void     set_mode(uint64_t cfg0);
  uint16_t read();
  void     write(uint16_t value);
  void     toggle();
  void     attach_irq(void(*fun)(void *param), void *param);
    
private:
  uint8_t  _pin_number;
};




